from django.db import models
from Washer.models import Users

# Create your models here.
class Note(models.Model):
    title = models.CharField('标题', max_length=64, default='')
    content = models.TextField('内容', default='')
    update_time = models.DateTimeField('更新时间', auto_now=True)
    create_time = models.DateTimeField('创建时间', auto_now_add=True)
    user = models.ForeignKey(Users, on_delete=models.CASCADE, default='')

    # 指定表名为note
    class Meta:
        db_table = 'note'